package com.xhwl.logistics.converter.mapstruct.logistics;

import com.xhwl.logistics.entity.logistics.SecurityRisk;
import com.xhwl.logistics.logistics.request.SecurityRiskParam;
import com.xhwl.logistics.vo.logistics.SecurityRiskVO;
import org.mapstruct.IterableMapping;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface SecurityRiskConverter {

    SecurityRiskConverter INSTANCE = Mappers.getMapper(SecurityRiskConverter.class);

    SecurityRisk toPoConvert(SecurityRiskVO source);

    SecurityRisk paramToPoConvert(SecurityRiskParam source);

    SecurityRiskVO toVoConvert(SecurityRisk source);

    @IterableMapping(elementTargetType = SecurityRisk.class)
    List<SecurityRisk> toPoConvertList(List<SecurityRiskVO> source);

    @IterableMapping(elementTargetType = SecurityRiskVO.class)
    List<SecurityRiskVO> toVoConvertList(List<SecurityRisk> source);
}
